<template>
  <view>
    <u-parse :content="info.content"></u-parse>
  </view>
</template>

<script>
  const host = `${process.env.VUE_APP_URL}`
  export default {
    data() {
      return {
        link: '',
        tag: '',
        webview_styles: {
          background: '#fff',
        },
        info: '',
      }
    },
    onLoad(options) {
      this.tag = options.tag || ''
      // this.link = `${host}/system/document/${this.tag}`
      this.specialArticle()
    },
    methods: {
      /**
       * 特殊文章
       */
      async specialArticle() {
        let params = {
          key: this.tag,
        }
        const res = await this.$api.common.system('specialArticle', params)
        if (res.code === 200) {
          this.info = res.data
          uni.setNavigationBarTitle({
            title: res.data.title,
          })
        }
      },
    },
  }
</script>

<style>
  page {
    font-size: 32rpx;
    background: #fff;
  }
</style>
